import threading
import itertools
import sys
import time


class Signal(object):
    go = True


def spin(msg, signal):
    write, flush = sys.stdout.write, sys.stdout.flush
    for char in itertools.cycle('|/-\\'):
        print(char)
